﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace craigsPack
{
    public class KeywordCollection : CollectionBase
    {
        public void Add(string obj)
        {
            InnerList.Add((string)obj);
        }
        public string ToUrlSafe()
        {
            StringBuilder sb = new StringBuilder();
            foreach (string item in InnerList)
            {
                sb.Append((string)item + " ");
            }
            return sb.ToString();
        }
        protected override void OnInsert(int index, object value)
        {
            if(!InnerList.Contains(value))
                base.OnInsert(index, value);
        }
    }
}
